Java Idioms - Exception Handling
نویسنده
چکیده
Exceptions are a powerful feature for the propagation and handling of failure of operations. Naive use of exceptions however introduces subtle complexity into a system due to the nonlocal nature of throwing an exception. This paper presents a pattern language of eleven Java idioms which serve as a framework for using exceptions. The patterns help to balance the forces that the overall complexity must be limited, that the code must be modifiable and extensible, the source code must be clear and the overall system must be robust.
منابع مشابه
Asynchronous Transfer of Control in the Real-Time Specification for Java
The Real-Time Specification for Java provides a facility for Asynchronous Transfer of Control based on exception handling and a generalization of the interrupt() method from the Thread class. This mechanism allows the programming of useful idioms such as timeouts and thread termination without the latency found in polling, and it avoids the problems inherent in the Thread class’s stop() and des...
متن کاملImplementing Coordinated Exception Handling for Distributed Object-Oriented Systems with AspectJ
Exception handling is a very popular technique for incorporating fault tolerance into software systems. However, its use for structuring concurrent, distributed systems is hindered by the fact that the exception handling models of many mainstream object-oriented programming languages are sequential. In this paper we present an aspect-based framework for incorporating concurrent exception handli...
متن کاملRegaining Control of Exception Handling
Just as the structure of the normal operations of a system tends to degrade as the system evolves, the structure of exception handling also degrades. In this paper, we draw on our experience building and analyzing the exception structure of Java programs to describe why and how exception structure degrades. Fortunately, we need not let our exception structure languish. We also relate our experi...
متن کاملException Handling with Resumption: Design and Implementation in Java
Nowadays, nearly every mainstram programming language includes an exception handling mechanism. Basically, the variety of these mechanisms can be devided in two groups according to their handling models: Mechanisms which support exception termination and those which support resumption. Even though resumption was still an attractive alternative to termination for the first exception handling mec...
متن کاملA logical interpretation of Java-style exceptions
This paper presents a novel, type-based exception analysis for EC (an Exception Calculus)—a higher-order, typed programming language with first-class, Java-style exceptions. EC exceptions are predeclared and are subject to a nominal subtyping relation. Every exception has its own type, and generic exception handling is performed by handling a supertype of all applicable exceptions. Typing is ba...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2002